package game.entity.actor;

import edu.monash.fit2099.engine.*;
import game.entity.action.BuyAction;
import game.entity.actor.Allosaurs;
import game.entity.actor.Brachiosaur;
import game.entity.actor.Stegosaur;
import game.entity.item.*;

import java.util.ArrayList;
import java.util.List;

public class VendingMachine extends Actor {


    public VendingMachine() {
        super("VendingMachine",'$',100);
        inventory.add(new Fruit());
        inventory.add(new VegetarianMealPackage());
        inventory.add(new CarnivoreMealBag());
        inventory.add(new Egg<Brachiosaur>("Brachiosaur egg",'e',true,10));
        inventory.add(new Egg<Stegosaur>("Stegosaur egg",'e',true,10));
        inventory.add(new Egg<Allosaurs>("Allosaurs egg",'e',true,10));
        inventory.add(new LaserGun());
    }

    @Override
    public Actions getAllowableActions(Actor otherActor, String direction, GameMap map) {
        Actions actions = new Actions();
        for (Item item : inventory) {
            actions.add(new BuyAction(item));
        }
        return actions;
    }

    @Override
    public Action playTurn(Actions actions, Action lastAction, GameMap map, Display display) {
        return new DoNothingAction();
    }

}
